# README

**Replication files** for:

Aguilar, Paloma, Fernando de la Cuesta, Ignacio Sánchez-Cuenca, and Francisco Villamil, **'Mobilization capacity and violence against local leaders: Anticlerical violence during the Spanish Civil War.'** *Comparative Political Studies,* forthcoming.

This folder contains the following files:

### Data files

There are three data files in the `data` folder (see the **codebook** at the end for a brief explanation of each variable):

- `dataset.csv`: the main local-level dataset used in most analyses
- `dataset_weekly.csv`: municipality-week dataset used for the time series analyses
- `anticlerical_individual.csv`: an individual-level dataset used only for some descriptives plots (number of clerics killed over time)

### R code files

Any of these R scripts can be run separately, in no particular order.

- `descriptives.R`: creates the descriptive statistics output, including graphs and tables
- `main_models.R`: runs the main models and produces LaTeX tables and graphs with the output
- `models_weekly.R`: runs the analyses using municipality-week data
- `models_categorias_cat.R`: runs the analyses on Catalan municipalities using the disaggregated measures of killings by victim occupation

### Extras

- `func.R` contains a series of R functions used in the analyses
- Shapefiles, adapted from [GADM](https://gadm.org/index.html) data on Spanish local divisions ([download here](https://geodata.ucdavis.edu/gadm/gadm4.1/shp/gadm41_ESP_shp.zip)), adapted to match territorial changes ([see this](https://github.com/franvillamil/muniSpain)). Used to create the map.

All analyses were run using R on macOS. We show in the next page the output from `sessionInfo()` when running the main models. Output from the R code is saved in a folder named `output`, it needs to be created if it doesn't exist yet.

*Note*: The table-generating code was written using version 1.4.5 of `modelsummary.` Versions 2.0.0 and later [introduced](https://modelsummary.com/NEWS.html) a major change in the default table output, so it might not work: either uninstall and revert to old version or adapt code.

\newpage

```
R version 4.3.2 (2023-10-31)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Ventura 13.4

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRblas.0.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: Europe/Madrid
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] stringr_1.5.1      dplyr_1.1.4        tidyr_1.3.1        paletteer_1.5.0   
[5] broom_1.0.5        ggplot2_3.5.1      kableExtra_1.3.4   modelsummary_1.4.5

loaded via a namespace (and not attached):
 [1] gtable_0.3.5      rematch2_2.1.2    compiler_4.3.2    webshot_0.5.5    
 [5] tidyselect_1.2.1  xml2_1.3.6        systemfonts_1.0.5 scales_1.3.0     
 [9] fastmap_1.2.0     R6_2.5.1          tables_0.9.17     generics_0.1.3   
[13] knitr_1.45        backports_1.4.1   tibble_3.2.1      insight_0.19.10  
[17] munsell_0.5.1     svglite_2.1.3     pillar_1.9.0      rlang_1.1.3      
[21] utf8_1.2.4        stringi_1.8.4     xfun_0.44         viridisLite_0.4.2
[25] cli_3.6.2         withr_3.0.0       magrittr_2.0.3    digest_0.6.35    
[29] rvest_1.0.3       grid_4.3.2        rstudioapi_0.15.0 lifecycle_1.0.4  
[33] vctrs_0.6.5       evaluate_0.23     glue_1.7.0        fansi_1.0.6      
[37] colorspace_2.1-0  purrr_1.0.2       rmarkdown_2.27    httr_1.4.7       
[41] tools_4.3.2       pkgconfig_2.0.3   htmltools_0.5.8.1
```

\newpage

## CODEBOOK

### dataset.csv

- `COD_INE`: Municipality code
- `muni_name`: Municipality name
- `prov_name`: Province name
- `ccaa`: Region name
- `anticlerical_bin`: Anticlerical violence, binary
- `anticlerical`: Number of anticlerical killings
- `anticlerical_secular`: Number of anticlerical killings, secular priests
- `anticlerical_regular`: Number of anticlerical killings, regular clergy
- `anticlerical_muerte`: Number of anticlerical killings by place of death
- `anticlerical_secular_muerte`: AC killings by place of death, secular priests
- `anticlerical_regular_muerte`: AC killings by place of death, regular clergy
- `anticlerical_l`: Number of anticlerical killings, logged
- `anticlerical_secular_l`: AC killings, secular priests, logged
- `anticlerical_regular_l`: AC killings, regular clergy, logged
- `anticlerical_muerte_l`: AC killings by place of death, logged
- `anticlerical_secular_muerte_l`: AC killings by place of death, secular priests, logged
- `anticlerical_regular_muerte_l`: AC killings by place of death, regular clergy, logged
- `anticlerical_mujeres_bin`: Nuns killed, binary
- `anticlerical_mujeres_l`: Number of nuns killed, logged
- `muerte_leader`: Number of local leaders killed, Catalonia data
- `muerte_clero_s`: Number of secular clergy killed, Catalonia data
- `muerte_clero_r`: Number of regular clergy killed, Catalonia data
- `muerte_security`: Number of security forces killed, Catalonia data
- `muerte_other`: Number of other civilians killed, Catalonia data
- `patr33_bin`: Employers' associations, binary indicator
- `socios_patr33_l`: Employers' associations, logged number of members
- `socios_patr33_p_l`: Employers' associations, logged members by 1,000 people
- `patr33_agra_bin`: Employers' associations, binary, only agrarian sectors
- `patr33_no_agra_bin`: Employers' associations, binary, only non-agrarian sectors
- `CNT_bin`: CNT presence
- `CNT_1936_l`: Logged number of CNT members
- `CNT_1936_p_l`: Logged number of CNT members by 1,000 people
- `UGT_bin`: UGT presence
- `UGT_1932_l`: Logged number of UGT members
- `UGT_1932_p_l`: Logged number of UGT members by 1,000 people
- `compet_UGT_CNT_noNA`: Competition index between UGT and CNT
- `compet_UGTCNT_patr33_noNA`: Competition, UGT/CNT vs employers' association
- `repub_violence`: Victims of Republican violence
- `anticle_2rep_lv`: Anticlerical violence during II Republic (López-Villaverde)
- `anticle_1820_mc`: Anticlerical violence in the early 19th century (Muns-Castellet)
- `pop1930`: Population in 1930
- `pop1930_l`: Logged population in 1930
- `izq1936`: Leftist vote in 1936
- `compet1936`: Electoral competition in 1936
- `fecha_control_rep`: Date of territorial control by Nationalists
- `dias_control_rep`: Days under Republican control
- `dias_control_rep_l`: Days under Republican control, logged
- `analfab30_total`: Illiteracy rate in 1930
- `clerics_all_l`: Number of clerics in early 1900s, logged

### dataset_weekly.csv

- `COD_INE`: Municipality code
- `prov_name`: Province name
- `week`: Week number (since July 17, 1936)
- `weeks_to_nc`: Weeks to fall to Nationalist control
- `week_since_str`: Weeks since war start
- `fecha_control_rep`: Date of territorial control by Nationalists
- `weekly_ac_l`: Weekly anticlerical violence, logged
- `weekly_ac_sec_l`: Weekly anticlerical violence, logged, only secular priests
- `weekly_ac_reg_l`: Weekly anticlerical violence, logged, only regular clergy
- `patr33_bin`: Binary indicator of emplooyers' association
- `CNT_bin`: Binary indicator of CNT presence
- `UGT_bin`: Binary indicator of UGT presence
- `pop1930_l`: Logged population in 1930
- `izq1936`: Leftist vote in 1936
- `analfab30_total`: Illiteracy rate in 1930
- `clerics_all_l`: Number of clerics in early 1900s, logged

### anticlerical_individual.csv

- `ID`: Individual id number
- `CLERO`: Type of clergy
- `COD_INE`: Municipality code (residence)
- `COD_INE_MUERTE`: Municipality code (place of death)
- `date`: Date of death
